/**
 * Copyright(C) 2018 Fugle Technology Co., Ltd. All rights reserved.
 */
package com.ifugle.rap.application.service;

import com.ifugle.rap.application.api.UserApi;
import com.ifugle.rap.application.mapper.AppUserMapper;
import com.ifugle.rap.application.model.AppUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 *
 * @author HuangLei(wenyuan)
 * @version $Id UserService.java v 0.1 2018/8/7 HuangLei(wenyuan) Exp $
 */
@Component
public class UserService implements UserApi {

    @Autowired
    AppUserMapper appUserMapper;

    @Override
    public int deleteByPrimaryKey(Long id) {
        return appUserMapper.deleteByPrimaryKey(id);
    }

    @Override
    public Long insert(AppUser record) {
        return appUserMapper.insert(record);
    }

    @Override
    public Long insertSelective(AppUser record) {
        return appUserMapper.insertSelective(record);
    }

    @Override
    public AppUser selectByPrimaryKey(Long id) {
        return appUserMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(AppUser record) {
        return appUserMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(AppUser record) {
        return appUserMapper.updateByPrimaryKey(record);
    }

    @Override
    public AppUser selectByOpenId(String openId){
        return appUserMapper.selectByOpenId(openId);
    }
}
